package com.liveinstars.gateway.business.service;

import org.springframework.cloud.gateway.route.RouteDefinition;
import reactor.core.publisher.Flux;

import java.util.List;

/**
 * @author: ting
 * @date: 2019-07-15
 */
public interface DynamicRouteService {
    /**
     * 路由更新
     * @param routeDefinition
     * @return
     */
    boolean update(RouteDefinition routeDefinition);

    /**
     * 路由添加
     * @param routeDefinition
     * @return
     */
    boolean add(RouteDefinition routeDefinition);

    /**
     * 路由删除
     * @param id
     * @return
     */
    boolean deleteById(String id);

    boolean updateAll(List<RouteDefinition> list);

    Flux<RouteDefinition> getRouters();

}
